package com.ts.ischool.service;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import com.ts.ischool.dao.CalendarDao;
import com.ts.ischool.pojo.CalendarBean;

public class CalendarServiceImpl implements CalendarService {
	
	private CalendarDao calendarDao;

	public void setCalendarDao(CalendarDao calendarDao) {
		this.calendarDao = calendarDao;
	}

	@Override
	public List<CalendarBean> queryCalendars(Date qstart, Date qend,
			String userId) {
		return calendarDao.queryCalendars(qstart, qend, userId);
	}

	@Override
	public Long addCalendar(CalendarBean c) {
		return calendarDao.addCalendar(c);
	}

	@Override
	public void addCalendarBatch(List<CalendarBean> list) throws SQLException {
		calendarDao.addCalendarBatch(list);
	}

	@Override
	public CalendarBean getCalendar(String id) {
		return calendarDao.getCalendar(id);
	}

	@Override
	public void updateCalendar(CalendarBean c) {
		calendarDao.updateCalendar(c);
	}

	@Override
	public void deleteCalendar(String id) {
		calendarDao.deleteCalendar(id);
	}

	@Override
	public List<CalendarBean> findCalendarsByIds(String[] ids) {
		return calendarDao.findCalendarsByIds(ids);
	}

	@Override
	public void updateCalendarBatch(List<CalendarBean> list)
			throws SQLException {
		calendarDao.updateCalendarBatch(list);
	}

	@Override
	public void deleteCalendarByGoogleId(String id) {
		calendarDao.deleteCalendarByGoogleId(id);
	}

	@Override
	public CalendarBean getCalendarByGoogleId(String id) {
		return calendarDao.getCalendarByGoogleId(id);
	}

	@Override
	public void deleteCalendarBatch(String[] ids) {
		calendarDao.deleteCalendarBatch(ids);
	}

	@Override
	public List<CalendarBean> findCalendarsByUserId(Long id) {
		return calendarDao.findCalendarsByUserId(id);
	}

}
